<%@ page import="java.io.File" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/8/27
  Time: 9:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<%
    String workerNo=(String) session.getAttribute("workerNo");
    String courseNo=(String) session.getAttribute("courseNo");
    String dirName=request.getParameter("dirName");
    String filePath="F:\\JWGLXT\\web\\StoreResoures\\"+workerNo+"\\"+courseNo;
%>
<head>
    <title>知识点</title>
    <link href="/SystemerNav/SystemerNav.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body background="/LoginInterface/loginFace.jpg">
<div class="container">
    <div class="top">
        <table class="table table-hover">
            <tr>
                <td>知识点</td>
                <td>详细</td>
            </tr>
            <%
                String filePaths=filePath+'/'+dirName;
                File file=new File(filePaths);
                if(!file.exists()){
                    //如果文件夹不存在则创建之
                    file.mkdirs();
                }
                String [] f_arry=file.list();
                if(file.isDirectory()){
                    for (int i=0;i<f_arry.length;i++) {
            %>
            <tr>
                <td><%=f_arry[i]%></td>
                <td>
                    <form action="knowledgePointRes.jsp">
                        <input type="hidden" name="dirName" value="<%=dirName%>">
                        <input type="hidden" name="point" value="<%=f_arry[i]%>">
                        <input type="hidden" name="workerNo" value="<%=workerNo%>">
                        <input type="hidden" name="courseNo" value="<%=courseNo%>">
                        <button type="submit" class="btn btn-success">相关资料</button>
                    </form>
                </td>
            </tr>


            <%
                    }

                }
            %>
        </table>
    </div>
</div>
</body>
</html>
